package com.breakfast.fun.data.entity.mall;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by yukai on 16/10/2.
 */

public class Abroad {

    /**
     * total : 10
     * pageTotal : 10
     * data : [{"id":88,"name":"森永 日本进口蛋糕粉松饼粉亲子自制早餐烘焙原料华夫饼粉600g*2","image":"http://m.52letsgo.cn/product_image/13/14/a003d47f-f_617976180.jpg","bigImage":"http://m.52letsgo.cn","price":72,"des":"<p>\t<span style=\"font-size:16px;\">偏远地区，邮费另算<\/span><\/p><p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-30-39/2016-09-30-393.665762365300538.jpg\" style=\"width: 100%;\" /><img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-30-53/2016-09-30-531.5647178192686029.jpg\" style=\"width: 100%;\" /><img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-30-34/2016-09-30-349.367064269162617.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":0,"praise":0,"typeName":"海外营养早餐","count":999,"addTime":"2016-09-30 16:24:41","updateTime":"2016-09-30 16:25:28","state":0,"sort":22,"link":"","dateCount":0},{"id":89,"name":"谷旗核桃芝麻黑豆粉台湾进口黑芝麻核桃粉五谷杂粮粉营养早餐代餐","image":"http://m.52letsgo.cn/product_image/7/15/223883e0-5_538468454.jpg","bigImage":"http://m.52letsgo.cn","price":99,"des":"<p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-30-54/2016-09-30-5413.286556656751307.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":0,"praise":0,"typeName":"海外营养早餐","count":999,"addTime":"2016-09-30 16:27:05","state":0,"sort":22,"link":"","dateCount":0},{"id":86,"name":"澳洲进口阿诺农场即食果仁水果颗粒燕麦片1kg早餐冲饮谷物麦片","image":"http://m.52letsgo.cn/product_image/1/3/fa72af45-a_-1794695258.jpg","bigImage":"http://m.52letsgo.cn","price":47.8,"des":"<p>\t<span style=\"font-size:16px;\">多种口味，下单时请备注：口味种类<\/span><\/p><p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-23-51/2016-09-23-5127.291757323658743.jpg\" style=\"width: 100%;\" /><img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-23-10/2016-09-23-1016.028439119254504.jpg\" style=\"width: 100%;\" /><img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-23-24/2016-09-23-243.3397016526480314.jpg\" style=\"width: 100%;\" /><img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-23-40/2016-09-23-400.9284382992220741.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":18,"praise":0,"typeName":"海外营养早餐","count":999,"addTime":"2016-09-23 11:35:55","updateTime":"2016-09-23 11:38:45","state":0,"sort":21,"link":"","dateCount":0},{"id":87,"name":"福多提拉米苏味蛋糕奶油味进口零食小面包早餐食品软面包糕点432g","image":"http://m.52letsgo.cn/product_image/7/7/8d98accf-a_1989060767.jpg","bigImage":"http://m.52letsgo.cn","price":34,"des":"<p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-23-54/2016-09-23-540.11395960166823427.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":4,"praise":0,"typeName":"海外营养早餐","count":999,"addTime":"2016-09-23 11:37:14","state":0,"sort":21,"link":"","dateCount":0},{"id":82,"name":"进口零食品宏亚 77松塔/千层酥500g饼干","image":"http://m.52letsgo.cn/product_image/3/1/b7921118-9_152182572.jpg","bigImage":"http://m.52letsgo.cn","price":32.8,"des":"<p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-09-11/2016-09-09-118.316735997907866.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":12,"praise":0,"typeName":"海外营养早餐","count":996,"addTime":"2016-09-09 15:43:21","state":0,"sort":20,"link":"","dateCount":1},{"id":83,"name":"5瓶装 泰国豆奶饮料哇米诺vamino豆奶饮品营养","image":"http://m.52letsgo.cn/product_image/7/12/76fa8657-b_-959539563.jpg","bigImage":"http://m.52letsgo.cn","price":27.5,"des":"<p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-09-13/2016-09-09-1315.987680328764649.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":8,"praise":0,"typeName":"海外营养早餐","count":999,"addTime":"2016-09-09 15:46:27","state":0,"sort":20,"link":"","dateCount":0},{"id":78,"name":" 澳洲原装进口奶粉a2全脂奶粉 青年成人老人早餐冲调奶粉1kg","image":"http://m.52letsgo.cn/product_image/4/0/649c8f9b-7_1863091080.jpg","bigImage":"http://m.52letsgo.cn","price":59,"des":"<p>\t<span style=\"font-size:16px;\">偏远地区不送<\/span><\/p><p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-02-34/2016-09-02-3427.07901926348134.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":32,"praise":0,"typeName":"海外营养早餐","count":999,"addTime":"2016-09-02 17:25:55","updateTime":"2016-09-02 17:27:38","state":0,"sort":19,"link":"","dateCount":0},{"id":79,"name":"日本特产糕点富士山蒸蛋糕点心早餐零食16个/盒","image":"http://m.52letsgo.cn/product_image/0/13/633155e4-b_-931310998.jpg","bigImage":"http://m.52letsgo.cn","price":148,"des":"<p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-09-02-46/2016-09-02-4622.589587638190423.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":21,"praise":0,"typeName":"海外营养早餐","count":999,"addTime":"2016-09-02 17:26:57","state":0,"sort":19,"link":"","dateCount":0},{"id":72,"name":"进口零食大礼包越南tipo面包干300g","image":"http://m.52letsgo.cn/product_image/8/15/858d9aae-2_897516309.jpg","bigImage":"http://m.52letsgo.cn","price":13.5,"des":"<p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-08-26-59/2016-08-26-594.877190374050732.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":2,"praise":0,"typeName":"海外营养早餐","count":999,"addTime":"2016-08-26 11:13:31","state":0,"sort":18,"link":"","dateCount":0},{"id":73,"name":" 凤梨酥45gx10个 台湾进口特产糕点 中秋礼盒 包邮","image":"http://m.52letsgo.cn/product_image/9/1/547005a8-0_1181300630.jpg","bigImage":"http://m.52letsgo.cn","price":88,"des":"<p>\t<img alt=\"\" src=\"http://m.52letsgo.cn/upload/2016-08-26-40/2016-08-26-4013.413546062238385.jpg\" style=\"width: 100%;\" /><\/p>","type":3,"sellcount":1,"praise":0,"typeName":"海外营养早餐","count":999,"addTime":"2016-08-26 11:15:01","updateTime":"2016-08-26 11:15:47","state":0,"sort":18,"link":"","dateCount":0}]
     * msg : 查询成功
     * success : true
     */

    private int total;
    private int pageTotal;
    private String msg;
    private boolean success;
    private List<Mall.DataBean.GoodsBean> data;

    public static Abroad objectFromData(String str) {

        return new Gson().fromJson(str, Abroad.class);
    }

    public static List<Abroad> arrayAbroadFromData(String str) {

        Type listType = new TypeToken<ArrayList<Abroad>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(int pageTotal) {
        this.pageTotal = pageTotal;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public List<Mall.DataBean.GoodsBean> getData() {
        return data;
    }

    public void setData(List<Mall.DataBean.GoodsBean> data) {
        this.data = data;
    }
}
